// BWCrossStitchStorage.h -- handle collections of cross stitches
// used by BWCrossStitchSet (which includes some geometry-related jazz), and
// BWCrossStitchChangeSet (which doesn't)

#import <Cocoa/Cocoa.h>
#import "BWCrossStitch.h"

@class BWThread;

@interface BWCrossStitchStorage : NSObject <NSCoding>
{
    NSMutableArray *symbols;
    NSMutableIndexSet *existanceSet;
}

- (int) count;
- (BWCrossStitch *) symbolAtIndex: (int) index;

- (BOOL) isSymbolAtRow: (int) row
                column: (int) column;

- (BOOL) getSymbol: (BWCrossStitch **) foundSymbol
             atRow: (int) row
            column: (int) column;

- (void) addStitchWithThread: (BWThread *) thread
                       atRow: (int) row
                      column: (int) column;

- (void) addStitchWithThread: (BWThread *) thread
                       atRow: (int) row
                      column: (int) column
                         tag: (int) kind;

- (void) addStitch: (BWCrossStitch *) stitch;

- (void) removeSymbolAtRow: (int) row
                    column: (int) column;

- (NSArray *) symbols;

- (void) purge;

@end // BWCrossStitchStorage


